#include<stdio.h>

int main()
{
     int i, n, a[100];
     printf("How many element do you want to input:");
     scanf("%d", &n);
     
     for(i=0; i<=n-1; i++)
     {
          printf("Enter a[%d]=",i);
          scanf("%d", &a[i]);         
     }
     i=0;
     printf("%d", a[i]);
     for(i=0;i<=n-2;i++)
     {
          if(a[i]!=a[i+1]) printf(" %d",a[i+1] );
     }
     getch();
}
